//
//  EWTools.h
//  haveSomethingToEat
//
//  Created by 陈 宁权 on 17/4/13.
//  Copyright © 2017年 陈 宁权. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface EWTools : NSObject

+ (instancetype)shareTools;

//获取随机数
- (NSString *)getRandomNonce;
//获取时间戳 从1970年
- (NSString *)getTimestamp;
//获取从 from 到  to 的随机数
- (NSInteger)getRandomNumber:(NSInteger)from to:(NSInteger)to;
//sha1 加密
- (NSString *)sha1WithKey:(NSString *)key;
//根据appSecret nonce timestamp 获取signature
- (NSString *)getSignatureWithAppSecret:(NSString *)appSecret nonce:(NSString *)nonce timestamp:(NSString *)timestamp;
@end
